The present invention relates generally to code version selection in a computer system, and more specifically, to fingerprint-based code version selection.
During execution of computer software, the best version of code to execute for a particular method may vary depending on the task that is being performed when the method is called. For example, the optimal code version of a method that computes a function of a very large array variable may not be the same as the optimal code version of the method when the array variable is relatively small. Therefore, if the code for the method is optimized by the compiler into a first code version during a first call of the method, there is no guarantee that the same code version of the method will be good for subsequent calls to the method, because subsequent calls may be performed in different contexts or receive variables of different sizes.